using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._CrimeAnalysisandSafetyTools
{
    /// <summary>
    /// <para>Join Attributes From Polygon</para>
    /// <para>Joins attributes from input polygon features to input point features.</para>
    /// <para>将输入面要素的属性与输入点要素的连接。</para>
    /// </summary>    
    [DisplayName("Join Attributes From Polygon")]
    public class JoinAttributesFromPolygon : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public JoinAttributesFromPolygon()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_target_features">
        /// <para>Target Point Features</para>
        /// <para><xdoc>
        ///   <para>The point features to be updated with attributes from the Input Polygon Features.</para>
        ///   <para>The point features to be updated with attributes from the in_features.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要使用输入面要素中的属性更新的点要素。</para>
        ///   <para>要使用in_features中的属性更新的点要素。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_in_features">
        /// <para>Input Polygon Features</para>
        /// <para>The input polygon features.</para>
        /// <para>输入面要素。</para>
        /// </param>
        public JoinAttributesFromPolygon(object _target_features, object _in_features)
        {
            this._target_features = _target_features;
            this._in_features = _in_features;
        }
        public override string ToolboxName => "Crime Analysis and Safety Tools";

        public override string ToolName => "Join Attributes From Polygon";

        public override string CallName => "ca.JoinAttributesFromPolygon";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_target_features, _in_features, _fields, _out_features];

        /// <summary>
        /// <para>Target Point Features</para>
        /// <para><xdoc>
        ///   <para>The point features to be updated with attributes from the Input Polygon Features.</para>
        ///   <para>The point features to be updated with attributes from the in_features.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要使用输入面要素中的属性更新的点要素。</para>
        ///   <para>要使用in_features中的属性更新的点要素。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Target Point Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _target_features { get; set; }


        /// <summary>
        /// <para>Input Polygon Features</para>
        /// <para>The input polygon features.</para>
        /// <para>输入面要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Polygon Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>Join Fields</para>
        /// <para>The fields from the Input Polygon Features that will be appended to the Target Point Features.</para>
        /// <para>输入面要素中的字段将追加到目标点要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Join Fields")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _fields { get; set; } = null;


        /// <summary>
        /// <para>Updated Point Features</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Point Features")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_features { get; set; }


        public JoinAttributesFromPolygon SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}